<%@ page language="java"  pageEncoding="utf-8"%>
<%@ page import="java.util.Vector,com.ejoysoft.wlanyz.business.Latlng,com.ejoysoft.common.Constants,com.ejoysoft.common.exception.NoRightException" %>
<%@ include file="../include/jsp/head.jsp"%>
<%
if(!globa.userSession.hasRight("10005"))
      throw new NoRightException("用户不具备操作该功能模块的权限，请与系统管理员联系！");
 
    //初始化
    Latlng  latlng0=null;
    Latlng obj=new Latlng(globa);
    //查询条件
    String  strAcName=ParamUtil.getString(request,"strAcName","").trim();
    String strAcLocation = ParamUtil.getString(request,"strAcLocation","").trim();
	String tWhere=" WHERE 1=1";
	if(!strAcName.equals("")){
	 tWhere += " and acName LIKE '%" + strAcName + "%'";
	}
	if(!strAcLocation.equals("")){
	 tWhere += " and acLocation LIKE '%" + strAcLocation + "%'";
	}	
	 tWhere += " ORDER BY acName";
	//记录总数
	int intAllCount=obj.getCount(tWhere);	
	//当前页
	int intCurPage=globa.getIntCurPage();
	//每页记录数
	// int intPageSize=globa.getIntPageSize();
	int intPageSize = ParamUtil.getInt(request,"strPageSize",15);
	//共有页数
 	int intPageCount=(intAllCount-1)/intPageSize+1;
	// 循环显示一页内的记录 开始序号
	int intStartNum=(intCurPage-1)*intPageSize+1;
	//结束序号
	int intEndNum=intCurPage*intPageSize;   
	//获取到当前页面的记录集

	Vector<Latlng> vctObj=obj.list(tWhere,intStartNum,intPageSize);
	//获取当前页的记录条数
	int intVct=(vctObj!=null&&vctObj.size()>0?vctObj.size():0);
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
<link href="../common/css/css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
<!--
body {
	background-color: #f2f8ff;
}
.sel1{ width:160px;}
.STYLE1 {color: #FF0000}
.s6 a:link{ line-height:25px;height:25px; color:#333333}
.s6 a:hover{ line-height:25px;height:25px; color:#333333}
-->
</style>

 <script type="text/javascript" src="../js/createimghot.js" ></script>
 <script type="text/javascript">  
 function showPaper(){
             var tempArray = new Array();
		      /** 影射1 */
		      var tempObj = new Object();
		      /** 图片信息 */
		      // 图片ID
		      tempObj.img = new Object();
		      tempObj.img.id = "img1";
		      // 图片名称（只要图片名称，路径由公共变量设置）
		      //tempObj.img.imgName = "113.jpg";
		      // 设置图片尺寸
		      tempObj.img.width = "1600";
		      tempObj.img.height = "1280";
		      
		      /** 热区信息 */
		      var tempMap;
		      tempObj.map = new Array();
		      // 热点1
		      tempMap = new Object();
		      // 热区ID
		      tempMap.id = "test1_hot"
			 //热区鼠标悬停提醒
			  tempMap.title="热点区1悬停事件";
			      // 类型
		      tempMap.shape = "circle";
		      // 热区坐标
		      tempMap.coords = "668,215,10";
		      // 链接
		      tempMap.href = "#";
		      // 单击事件
		      // tempMap.onclick = showDetails;
		      // 添加到列表中
		      tempObj.map[0] = tempMap; 
		      
		      // 将图片及相应热区信息添加到列表中
		      tempArray[0] = tempObj;  
      			
        	  main(0,"mapName","mapId","mask","../114.jpg",tempArray);
     }
     
     showDetails = function(){
     	//alert("热点创建成功");
     	testMessageBox(event);
     }
      </script>

<script type="text/javascript">
var isIe=(document.all)?true:false;
//设置select的可见状态
function setSelectState(state)
{
	var objl=document.getElementsByTagName('select');
	for(var i=0;i<objl.length;i++)
	{
		objl[i].style.visibility=state;
	}
}
function mousePosition(ev)
{
	if(ev.pageX || ev.pageY)
	{
		return {x:ev.pageX, y:ev.pageY};
	}
	return {
		x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,y:ev.clientY + document.body.scrollTop - document.body.clientTop
	};
}
//弹出方法
function showMessageBox(pos,wWidth,wHeight)
{
		closeWindow();
		var bWidth=parseInt(document.documentElement.scrollWidth);
		var bHeight=parseInt(document.documentElement.scrollHeight);
		if(isIe){
		setSelectState('hidden');}
		var back=document.createElement("div");
		back.id="back";
		var styleStr="top:0px;left:0px;position:absolute;background:#666;width:"+bWidth+"px;height:"+bHeight+"px;";
		styleStr+=(isIe)?"filter:alpha(opacity=0);":"opacity:0;";
		back.style.cssText=styleStr;
	//	document.body.appendChild(back);
	//	showBgSuddenlly(back,50);//背景突然变暗
		//showBgGradually(back,50);//背景逐渐变暗
		var mesW=document.createElement("div");
		mesW.id="mesWindow";
		mesW.className="mesWindow";  
		var tempString = "";
		tempString = "<div id='contentDiv' class='mesWindowTop'><table  border='0' id='contentTable' cellspacing='0' cellpadding='0' bgcolor='#FFFFFF' style='margin-left:0px;width=500px' >"  +
							            "<tr><td>"+
								            "<table id='tb' width='99%' border='0' align='center' cellpadding='0' cellspacing='1' bgcolor='b0c0e0' style='margin:10px 0px 10px 0px;'><tr>"+
								            "<td style='font-size:14px;' bgcolor='d3e0fb'><strong>设备名称 </strong></td>" + 
				                           	"<td style='font-size:14px;' bgcolor='d3e0fb'><strong>信道号 </strong></td>" + 
				                           	"<td style='font-size:14px;' bgcolor='d3e0fb'><strong>频点</strong></td>" + 
				                           	"<td style='font-size:14px;' bgcolor='d3e0fb' ><strong>信噪比 </strong></td>" + 
				                           	"<td style='font-size:14px;' bgcolor='d3e0fb'><strong>发射功率</strong></td>" + 
				                           	"<td style='font-size:14px;' bgcolor='d3e0fb'><strong>信道质量</strong></td>" + 
								            "</tr><tr>" + 
								            "<td height='30'bgcolor='#FFFFFF'>AP-GDZYJSXX06#1F01</td>"+
								            "<td height='30' bgcolor='#FFFFFF'>CMCC</td>"+
								            "<td height='30' bgcolor='#FFFFFF'>1</td>"+
								            "<td height='30' bgcolor='#FFFFFF'>23</td>"+
								            "<td height='30' bgcolor='#FFFFFF'>2342</td>"+
								            "<td height='30' bgcolor='#FFFFFF'>34543</td>"+
								       "</tr></table></td></tr>"+
						  "</table></div>";	

		mesW.innerHTML=tempString; 
		//styleStr="left:"+(((pos.x-wWidth)>0)?(pos.x-wWidth):pos.x)+"px;top:"+(pos.y)+"px;position:absolute;width:"+wWidth+"px;";
		styleStr="";
		var leftPoint = pos.x;
		var topPoint = pos.y;
		var flagWP = 0;//横坐标左对齐
		var flagHP = 0;//纵坐标上对齐
		if((pos.x + wWidth) > bWidth){
			leftPoint = pos.x - wWidth;
			flagWP = 1;//横坐标右对齐
		}
		if(pos.y + wHeight > bHeight){
			topPoint = pos.y - wHeight;
			flagHP = 1;//纵坐标下对齐
		}
		styleStr="left:"+leftPoint+"px;top:"+topPoint+"px;position:absolute;width:"+wWidth+"px;";
		mesW.style.cssText=styleStr; 
		document.body.appendChild(mesW);
		document.getElementById("mesWindow").focus();
		document.getElementById("mesWindow").onblur=function(){
              document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow'));
        } 
}
//让背景渐渐变暗
function showBgGradually(obj,endInt)
{
		if(isIe)
		{
			obj.filters.alpha.opacity+=1;
			if(obj.filters.alpha.opacity<endInt)
			{
				setTimeout(function(){showBgGradually(obj,endInt)},5);
			}
		}else{
			var al=parseFloat(obj.style.opacity);
			al+=0.01;
			obj.style.opacity=al;
			if(al<(endInt/100))
			{
				setTimeout(function(){showBgGradually(obj,endInt)},5);
			}
		}
}

//让背景突然变暗
function showBgSuddenlly(obj,endInt)
{
		if(isIe)
		{
			obj.filters.alpha.opacity += endInt;//背景突然变暗
		}else{
			var al=parseFloat(obj.style.opacity);
			al+=0.01*endInt;
		 	obj.style.opacity=al;//背景突然变暗
		}
}
//关闭窗口
function closeWindow()
{
		if(document.getElementById('back')!=null)
		{
		document.getElementById('back').parentNode.removeChild(document.getElementById('back'));
		}
		if(document.getElementById('mesWindow')!=null)
		{
			document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow'));
		}
		if(isIe){
			setSelectState('');}
} 
//弹出窗口
function testMessageBox(ev)
{
	var objPos = mousePosition(ev); 
	showMessageBox(objPos,500,0);
}
 
</script>
</head> 
<body onload="showPaper()">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="8FA6BD">
  <tr>
    <td height="28" background="../images/ri_bg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="2%"><img src="../images/ri_1.jpg" width="25" height="28" /></td>
        <td width="98%" class="a0">拓扑呈现</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
    <table width="92%" border="0" align="center" cellpadding="0" cellspacing="0" >
      <tr>
        <td width="31%" height="40" ><div id="mask" align="center"></div>
       </td>
      </tr>
    </table>
    </td>
  </tr>
</table>
</body>
</html>
<%@ include file="../include/jsp/footer.jsp"%>